package com.tedu.pojo;

import java.util.List;

/**
 * 统一后台 返回前端的数据格式
 * {“data”:[用户对象]，”msg”:”本次请求是否成功，登录成功”，“code”：“200”}
 */
public class ResultData {
    private String msg; //请求结果信息
    private  int code;// 请求是否成功的编码信息
    private List<Object> data;//  数据结果
    // 必须添加无参的构造方法
    public ResultData() {
    }

    public ResultData(String msg, int code, List data) {
        this.msg = msg;
        this.code = code;
        this.data = data;
    }


    @Override
    public String toString() {
        return "ResultData{" +
                "msg='" + msg + '\'' +
                ", code=" + code +
                ", data=" + data +
                '}';
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public List<Object> getData() {
        return data;
    }

    public void setData(List<Object> data) {
        this.data = data;
    }
}
